<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Zend_Mime_Message - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.mime.message.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.mime.message.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.mime.mime.html">Zend_Mime</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.mime.html">Zend_Mime</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.mime.part.html">Zend_Mime_Part</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.mime.message" class="section"><div class="info"><h1 class="title">Zend_Mime_Message</h1></div>
    

    <div class="section" id="zend.mime.message.introduction"><div class="info"><h1 class="title">Introduction</h1></div>
        

        <p class="para">
            <span class="classname">Zend_Mime_Message</span> represents a <acronym class="acronym">MIME</acronym> compliant
            message that can contain one or more separate Parts (Represented as <a href="zend.mime.part.html" class="link"><span class="classname">Zend_Mime_Part</span></a> objects). With
            <span class="classname">Zend_Mime_Message</span>, <acronym class="acronym">MIME</acronym> compliant multipart
            messages can be generated from <span class="classname">Zend_Mime_Part</span> objects. Encoding
            and Boundary handling are handled transparently by the class.
            <span class="classname">Zend_Mime_Message</span> objects can also be reconstructed from given
            strings (experimental). Used by <a href="zend.mail.html" class="link"><span class="classname">Zend_Mail</span></a>.
        </p>
    </div>

    <div class="section" id="zend.mime.message.instantiation"><div class="info"><h1 class="title">Instantiation</h1></div>
        

        <p class="para">
            There is no explicit constructor for <span class="classname">Zend_Mime_Message</span>.
        </p>
    </div>

    <div class="section" id="zend.mime.message.addparts"><div class="info"><h1 class="title">Adding MIME Parts</h1></div>
        

        <p class="para">
            <a href="zend.mime.part.html" class="link"><span class="classname">Zend_Mime_Part</span></a>
            Objects can be added to a given <span class="classname">Zend_Mime_Message</span> object by
            calling  <span class="methodname">addPart($part)</span>
        </p>

        <p class="para">
            An array with all <a href="zend.mime.part.html" class="link"><span class="classname">Zend_Mime_Part</span></a>
            objects in the <span class="classname">Zend_Mime_Message</span> is returned from the method
             <span class="methodname">getParts()</span>. The <span class="classname">Zend_Mime_Part</span>
            objects can then be changed since they are stored in the array as references. If
            parts are added to the array or the sequence is changed, the array needs
            to be given back to the <a href="zend.mime.part.html" class="link"><span class="classname">Zend_Mime_Part</span></a>
            object by calling  <span class="methodname">setParts($partsArray)</span>.
        </p>

        <p class="para">
            The function  <span class="methodname">isMultiPart()</span> will return
            <b><tt>TRUE</tt></b> if more than one part is registered with the
            <span class="classname">Zend_Mime_Message</span> object and thus the object would generate a
            Multipart-Mime-Message when generating the actual output.
        </p>
    </div>

    <div class="section" id="zend.mime.message.bondary"><div class="info"><h1 class="title">Boundary handling</h1></div>
        

        <p class="para">
            <span class="classname">Zend_Mime_Message</span> usually creates and uses its own
            <span class="classname">Zend_Mime</span> Object to generate a boundary. If you need to define
            the boundary or want to change the behaviour of the <span class="classname">Zend_Mime</span>
            object used by <span class="classname">Zend_Mime_Message</span>, you can instantiate the
            <span class="classname">Zend_Mime</span> object yourself and then register it to
            <span class="classname">Zend_Mime_Message</span>. Usually you will not need to do this.
             <span class="methodname">setMime(Zend_Mime $mime)</span> sets a special instance of
            <span class="classname">Zend_Mime</span> to be used by this
            <span class="classname">Zend_Mime_Message</span>
        </p>

        <p class="para">
             <span class="methodname">getMime()</span> returns the instance of
            <span class="classname">Zend_Mime</span> that will be used to render the message when
             <span class="methodname">generateMessage()</span> is called.
        </p>

        <p class="para">
             <span class="methodname">generateMessage()</span> renders the
            <span class="classname">Zend_Mime_Message</span> content to a string.
        </p>
    </div>

    <div class="section" id="zend.mime.message.parse"><div class="info"><h1 class="title">parsing a string to create a Zend_Mime_Message object (experimental)</h1></div>
        

        <p class="para">
            A given <acronym class="acronym">MIME</acronym> compliant message in string form can be used to
            reconstruct a <span class="classname">Zend_Mime_Message</span> Object from it.
            <span class="classname">Zend_Mime_Message</span> has a static factory Method to parse this
            String and return a <span class="classname">Zend_Mime_Message</span> Object.
        </p>

        <p class="para">
             <span class="methodname">Zend_Mime_Message::createFromMessage($str, $boundary)</span>
            decodes the given string and returns a <span class="classname">Zend_Mime_Message</span>
            Object that can then be examined using  <span class="methodname">getParts()</span>
        </p>
    </div>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.mime.mime.html">Zend_Mime</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.mime.html">Zend_Mime</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.mime.part.html">Zend_Mime_Part</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="reference.html">Refer&ecirc;ncia do Zend Framework</a></li>
  <li class="header up"><a href="zend.mime.html">Zend_Mime</a></li>
  <li><a href="zend.mime.mime.html">Zend_Mime</a></li>
  <li class="active"><a href="zend.mime.message.html">Zend_Mime_Message</a></li>
  <li><a href="zend.mime.part.html">Zend_Mime_Part</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>